package com.tanxi521.springboot.pojo;


/**
 * @Author: i-xiaotian
 * @Date: 2022/3/25 14:59
 * @EMAIL: 1254806967@qq.com
 */
public class APIResult<T> extends BaseResult {

	public final static Integer UN_LOGIN = 50008;
	public final static Integer TOKEN_EXPIRED = 50014;
	public final static Integer FAIL = 40001;
	public final static Integer SUCCESS = 20000;
	public final static Integer UN_CORRECT_PASSWORD = 20001;
	public final static Integer UN_REG = 20002;

	private T data;

	public APIResult() {
		super.code = FAIL;
	}
	
	public APIResult(T data ,Integer code, String message) {
		this.data = data;
		super.code = code;
		super.message = message;
	}

	public APIResult(Integer code, String message) {
		super.code = code;
		super.message = message;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}
}
